function Tank(id) {

    // construct

    this.id = id;
    this.ready = true;    // default false
    this.image = new Image();
    this.image.src = "images/tankR.png"; // image from default tank position
    this.speed = 100;
    this.positionOnMap = "left";


    // getters

    this.getId = function() {
        return this.id;
    }

    this.getReady = function() {
        return this.ready;
    }

    this.getImage = function() {
        return this.image;
    }

    this.getImageSrc = function() {
        return this.image.src;
    }

    this.getSpeed = function() {
        return this.speed;
    }

    this.getPositionOnMap = function() {
        return this.positionOnMap;
    }


    // setters

    this.setId = function(id) {
        this.id = id;
    }

    this.setReady = function(ready) {
        this.ready = ready;
    }

    this.setImage = function(image) {
        this.image = image;
    }

    this.setImageSrc = function(imageURL) {
        this.image.src = imageURL;
    }

    this.setSpeed = function(speed) {
        this.speed = speed;
    }

    this.setPositionOnMap = function(positionOnMap) {
        this.positionOnMap = positionOnMap;
    }




    //other functions
    this.sum = function(a, b) {
        return (a+b);
    }

}
